home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
vla
/
int9
/
int9.asm
< prev
next >
Wrap
Assembly Source File
|
1993-07-25
|
2KB
|
89 lines
────────────────────────────────────────────────────────────────────────────
;
; This code was written by Draeden of VLA on June 28, 1993.
;
────────────────────────────────────────────────────────────────────────────
IDEAL
MODEL SMALL
STACK 200h
CODESEG
P386N
LOCALS
────────────────────────────────────────────────────────────────────────────
OldInt9 dd ?
INCLUDE "Int9.INC"
────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────
; Takes the info in Active_Keys and displays it graphically
────────────────────────────────────────────────────────────────────
PROC Display_Keys
pusha
push ds es
mov ax,cs
mov ds,ax
mov ax,0b800h
mov es,ax
xor bx,bx ;start on key # 0
mov si,bx
mov cx,10
@@Key_Disp_Loop:
cmp [Active_Keys + bx],0
je @@Off_Key
mov [WORD es:si],"■" + 1*100h
jmp short @@END
@@OFF_KEY:
mov [WORD es:si],"·" + 1*100h
@@END:
add si,2
dec cx
jne @@NotAt10
add si,160-20
mov cx,10
@@NotAt10:
inc bx
cmp bx,128
jb @@Key_Disp_Loop
pop es ds
popa
ret
ENDP
────────────────────────────────────────────────────────────────────────────
START:
mov ax,cs
mov ds,ax
mov ax,3
int 10h
mov bx,9
mov si,offset OldInt9
mov ax,cs
shl eax,16
mov ax,offset Int_09
call Install_Int
xor bl,bl
call SetKb ;make sure all the lights are off
@@MainLoop:
cmp [ESC_Pressed],0
jne @@All_Done
call Display_Keys
jmp @@MainLoop
@@All_Done:
mov bx,9
mov si,offset OldInt9
call Restore_Int
mov ax,4c00h
int 21h
END START